﻿namespace Kazkommertsbank.Framework.Model
{
    public abstract class ResponseDocumentBase
    {
        protected ResponseDocumentBase(string response)
        {
            ParseResponse(response);
            ResponseXml = response;
        }

        public abstract KkbResponseType ResponseType { get; }
        public bool SuccessfulParsed { get; private set; }
        public string ResponseXml { get; private set; }

        private void ParseResponse(string response)
        {
            SuccessfulParsed = ParseXml(response);
        }

        protected abstract bool ParseXml(string response);
    }
}